//
// File  : FlightsController.h
// Team  : Dangling Pointers
// Class : CST236 - Software Testing
//
// FlightsController header. The FlightsController
// provides all of the business logic for managing the
// flight database
//

#ifndef FLIGHTSCONTROLLER_H
#define	FLIGHTSCONTROLLER_H

#include "Controller.h"
#include "FlightDatabase.h"

class FlightsController : public Controller 
{
public:

	FlightsController(FlightDatabase* model);

private:

	// fields
	FlightDatabase* m_database;

	//
	// @overrided
	// copy constructor and operator= to prevent copying!
	//
	FlightsController(const FlightsController&);
	FlightsController& operator=(const FlightsController&);

	// methods
	void            displayMenu();
	void            addFlight();
	void            deleteFlight();
	void            updateFlight();
	void            returnToMainMenu();
	bool            validateTime(std::string);

	/**
	* gets the flight time in 24 hour format, or an empty string if nothing is 
	* entered.
	* @return 
	*/
	std::string     getFlightTime(std::string prompt, bool tackEmptyInput = false);
};

#endif	/* FLIGHTSCONTROLLER_H */

